<template>
<!-- ************每日一测、每日食谱部分************* -->
  <div class="everyday-test">
    <div class="test-box">
      <div class="every" v-for="(item,index) in imgs" :key="index">
        <router-link tag="div" :to="item.flag">
          <img :src="item.test_pic" alt="">
          <span>{{ item.text }}</span>
        </router-link>
      </div>
    </div>

  </div>
</template>

<script>

  export default {
    name:"EverydayTest",
    data(){
      return{
        imgs:[
          {
            test_pic:require("../../../assets/pimages/meiri.jpg"), // 305*185
            text:"每日一测",
            flag:"/viewleft"
          },
          {
            test_pic:require("../../../assets/pimages/meiri2.jpg"),
            text:"每日食谱",
            flag:"/viewright"
          }
        ]
      }
    }
  }
</script>

<style scoped>
.everyday-test{
  width: 100%;
  height: 2.6rem;
}
.test-box{
  width: 6.5rem;
  margin: 0 auto;
}
.test-box .every{
  margin-top: 0.3rem;
  display: inline-block;
  float: left;
}
.test-box .every:nth-child(2){
  float: right;
}
.test-box .every img{
  width: 3.05rem;
  height: 1.85rem;
}
.every span{
  display: block;
  color: #888;
  font-size: 13px;
  text-align: center;
  margin-top: 0.1rem;
}

</style>